Skip to content
This repository has been archived by the owner on Feb 10, 2025. It is now read-only.

Fix race condition in PollingDirectoryWatcher #71

Closed
wants to merge 2 commits into from
Closed

Conversation

grouma
Copy link
Contributor

@grouma grouma commented May 22, 2019

@grouma grouma requested a review from natebosch May 22, 2019 23:11
@natebosch
Copy link
Contributor

@grouma
Copy link
Contributor Author

grouma commented May 22, 2019

I don't think we want to change the logic in the file_watcher. A user is explicitly providing a path to watch and therefore would like want to be notified of watch errors. The directory watcher is using implicit file paths due to the polling logic.

@natebosch
Copy link
Contributor

A user is explicitly providing a path to watch and therefore would like want to be notified of watch errors

I don't think it would be considered an error. We handle the removed case at https://github.com/dart-lang/watcher/blob/562b9e588eb7abf5e734be04b4b710ca013764a1/lib/src/file_watcher/polling.dart#L57-L61 - we just have a potential race condition for if the file is removed in between our check for exists and our file stat.

@grouma grouma closed this Jun 18, 2019
@kevmoo kevmoo deleted the race-condition branch March 7, 2023 15:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Race condition in PollingDirectoryWatcher
3 participants